﻿<Window x:Class="MyTime.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:controls="clr-namespace:MyTime.Controls"
        Title="Task" MinHeight="25" MinWidth="400" ResizeMode="NoResize" SizeToContent="WidthAndHeight" 
        WindowStartupLocation="CenterScreen" WindowStyle="None" xmlns:my="clr-namespace:System;assembly=mscorlib">
    <Border BorderThickness="2" BorderBrush="Gray" Margin="2">        
        <Expander  Style="{DynamicResource ExpanderStyle1}">
            <Expander.Header>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="10*"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <controls:AdvTextBox VerticalAlignment="Top" Grid.Column="0" x:Name="txtTaskName" LabelString="Task" DefaultAction="txtTaskName_DefaultAction"  MinWidth="200"
                                 EscapeAction="txtTaskName_EscapeAction" ></controls:AdvTextBox>
                    <controls:AdvTextBox VerticalAlignment="Top" Grid.Column="1" AutoCompleteThreshold="1" x:Name="txtCategoryName" LabelString="Category" DefaultAction="txtTaskName_DefaultAction" Width="200"
                                 EscapeAction="txtTaskName_EscapeAction" ></controls:AdvTextBox>

                </Grid>
            </Expander.Header>
            <Expander.Content>
                <Grid Margin="5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="2*" ></ColumnDefinition>
                        <ColumnDefinition Width="2*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid x:Name="grid" Grid.Column="0" Grid.RowSpan="2">
                        <controls:AdvTextBox x:Name="txtDescription" LabelString="Description" TxtHeight="100" Width="{Binding ActualWidth, ElementName=grid}"
                                             DefaultAction="txtTaskName_DefaultAction" EscapeAction="txtTaskName_EscapeAction"></controls:AdvTextBox>
                    </Grid>
                    <ListBox Grid.Column="1" Grid.RowSpan="2" AllowDrop="True" Width="Auto" Name="lstListBox"                             
                             Drop="ListBox_Drop" 
                             BorderBrush="Gray">
                        <ListBox.Background>
                            <VisualBrush Stretch="None" Opacity=".5">
                                <VisualBrush.Visual>
                                    <Image Source="Icons\drop_box.png"></Image>
                                </VisualBrush.Visual>
                            </VisualBrush>
                        </ListBox.Background>
                    </ListBox>
                </Grid>
            </Expander.Content>
        </Expander>
    </Border>
</Window>
